package cn.com.open.errorquestion.controller;

import cn.com.open.errorquestion.model.MGQuestionLog;
import cn.com.open.errorquestion.service.ErrorQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping(value = "/errorquestion")
public class ErrorQuestionController {

    @Autowired
    private ErrorQuestionService errorQuestionService;


    /**
     * 查询错题记录
     * @return
     */
    @RequestMapping(value = "/list", method = {RequestMethod.POST,RequestMethod.GET})
    public List<MGQuestionLog> findErrorQuestionList(
            @RequestParam(defaultValue = "1") Integer pageNum,
            @RequestParam(defaultValue = "10")Integer pageSize
    ){
        return  errorQuestionService.list(pageNum,pageSize);
    }


}
